import { createContext, type Dispatch, type SetStateAction } from 'react';
import type { IMessage } from '@/types';

type AudioChatContextType = {
  wsConnected: boolean;
  setWsConnected: Dispatch<SetStateAction<boolean>>;
  botSpeaking: boolean;
  setBotSpeaking: Dispatch<SetStateAction<boolean>>;
  botAudioPlaying: boolean;
  setBotAudioPlaying: Dispatch<SetStateAction<boolean>>;
  userSpeaking: boolean;
  setUserSpeaking: Dispatch<SetStateAction<boolean>>;
  //
  chatMessages: IMessage[];
  setChatMessages: Dispatch<SetStateAction<IMessage[]>>;
};

export const AudioChatContext = createContext<AudioChatContextType>({} as unknown as never);
